package org.jeecg.modules.icms.invoice.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.poi.ss.usermodel.Sheet;
import org.jeecg.modules.icms.invoice.dto.IcmsInvoiceDetailDto;
import org.jeecg.modules.icms.invoice.entity.IcmsInvoiceHeader;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.icms.invoice.entity.IcmsInvoiceTitle;
import org.jeecg.modules.icms.invoice.vo.IcmsInvoiceHeaderVo;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * @Description: 发票头表
 * @Author: jeecg-boot
 * @Date:   2024-01-10
 * @Version: V1.0
 */
public interface IIcmsInvoiceHeaderService extends IService<IcmsInvoiceHeader> {

    /**
     * 导入开票头信息
     * @param sheet sheet表
     * @param icmsInvoiceDetailDto 导入的excel中非空行数据
     * @param flagRows 开票备注所在行
     * @param icmsInvoiceTitle 发票头对应的发票抬头信息
     * @return
     * @throws Exception
     */
    List<IcmsInvoiceHeader> addHeaderInfo (Sheet sheet, List<IcmsInvoiceDetailDto> icmsInvoiceDetailDto, List<Integer> flagRows, IcmsInvoiceTitle icmsInvoiceTitle) throws  Exception;

    /**
     * 开票头条件查询
     * @param icmsInvoiceHeaderVo
     * @param pageNo
     * @param pageSize
     * @param req
     * @return
     */
    IPage<IcmsInvoiceHeaderVo> queryAll(IcmsInvoiceHeaderVo icmsInvoiceHeaderVo, Integer pageNo, Integer pageSize, HttpServletRequest req);

    /**
     * 查询出未匹配的开票单列表
     * @return
     */
    List<IcmsInvoiceHeader> queryListWithoutMatch();
}
